/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package core;

import java.util.ArrayList;
import java.util.Collection;

/**
 *
 * @author Anton
 */
public class Shop extends SuperSchool
{
    private String XMLSource;
    private Collection<Book> books;

    public Shop()
    {
        super();
    }

    public Shop(String XMLSource)
    {
        super();
        this.XMLSource = XMLSource;
    }

    public Shop(long id, String name, String description, String webLink, String XMLSource)
    {
        super(id,name,description,webLink);
        this.XMLSource = XMLSource;
        this.books = new ArrayList<Book>();
    }
    
    public Shop(long id, String name, String description, String webLink, String XMLSource, Collection<Book> books)
    {
        super(id,name,description,webLink);
        this.XMLSource = XMLSource;
        this.books = books;
    }  

    public String getXMLSource()
    {
        return XMLSource;
    }

    public void setXMLSource(String XMLSource)
    {
        this.XMLSource = XMLSource;
    }

    public Collection<Book> getBooks(){
        return books;
    }

    public void setBooks(Collection<Book> books){
        this.books = books;
    }

    public boolean addBook(Book book)
    {
        return books.add(book);
    }

    public boolean removeBook(Book book)
    {
        return books.remove(book);
    }

    public boolean equals(Shop s)
    {
        return super.equals(s);
    }
    
    @Override
    public String toString()
    {
        String str = super.toString();
        str +=  "XMLSource: " + XMLSource + "\n";
        return str;
    }

}
